{% extends 'base.html' %}
{% block content %}

{% if user.is_staff or user == forumpost.author %}
            {% if not thread.locked %}
            <h1>Edit Post</h1>
            <form action="" method="post">
                {% csrf_token %}
                <textarea name="new_body">{{ forumpost.body }}</textarea>
                <input type="submit" name="edit_forumpost" value="Save Edit" />
                <input type="hidden" name="forumpost" value= {{ forumpost.id }} />
            </form> 
            {% else %}
                You cannot edit posts in a locked thread.
            {% endif %}
            {% else %}
            You should not be here
{% endif %}
{% endblock %}